package com.smartsaas.ugclivii.cd;

import nxopen.NXException;
import nxopen.blockstyler.Node;
import nxopen.blockstyler.Tree;
import nxopen.blockstyler.TreeListMenu;

import java.rmi.RemoteException;

public class MlTreeMenuHandler implements Tree.OnMenuCallback {
    @Override
    public void onMenuCallback(Tree tree, Node node, int i) throws NXException, RemoteException {
        if(node!=null){
            TreeListMenu menu = tree.createMenu();
            menu.addMenuItem(0,"删除节点","delete");
            tree.setMenu(menu);
        }
    }
}
